<?php

defined('IN_IA') or exit('Access Denied');

class Bus_SudokuModuleProcessor extends WeModuleProcessor {
	public function respond() {
		//$content = $this->message['content'];
		global $_W,$_GPC;
		$rid = $this->rule;
		$uid = $_W['uniacid'];
		$act = pdo_fetch("select * from ".tablename("bus_sudoku_activity")." where ruleid=:rid and uniacid = :uid",array(":rid"=>$rid,":uid"=>$uid));
		if (!empty($act)) {
			$news = array();
			$picurl = $_W['attachurl'] . $act['new_icon'];
			$news[] = array('title' => $act['new_title'], 'description' => $act['new_content'], 'picurl' => $picurl, 'url' => $this->createMobileUrl('Index', array('id' => $act['id'])));
			return $this->respNews($news);
		}

		return $this->respText('游戏不存在');
	}
}